feat: add cortex count command#8
Open
rishicodely wants to merge 3 commits intoProductionLineHQ:mainfrom
Open
Conversation
There was a problem hiding this comment.
Welcome to Cortex! Thanks for your first pull request.
Here's what happens next:
- CI will run tests, linting, and type checks automatically
- A maintainer will review your changes
- We may suggest some modifications or improvements
- Once approved, we'll merge it in
Checklist reminder:
- Tests pass (
pnpm test) - Lint passes (
pnpm lint) - Types check (
pnpm typecheck)
Thanks for helping make Cortex better! Every contribution matters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a new cortex count CLI command to display total memory count using the /api/health endpoint.
Supports optional --json output.
Why?
The current cortex status command shows memory count along with other details.
This PR introduces a lightweight command to quickly retrieve just the memory count, improving usability for scripting and quick checks.
How to test it
node dist/start.js
node dist/index.js count
→ Should print a number (e.g., 0, 47)
node dist/index.js count --json
→ Should output:
{ "total": }
Screenshots / recordings
Checklist
pnpm test)pnpm typecheck)pnpm lint)